<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


  
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">

  
  <title>NyMPh 2.0 - Documentation</title>
</head>


<body style="font-family: Verdana;">


<big style="font-family: Verdana;"><big>NyMPh -
Neeley's MP3 Player<br>


<small><small><img style="width: 16px; height: 16px;" alt="" src="nymphlogo.png"> <small>Version 2.0
Documenation</small></small></small></big></big><big style="font-family: Verdana;"><big><small><small><br>


<small>Last modified on August 5, 2007.</small><br>


</small></small></big></big>

<big style="font-family: Verdana;"><big><small><small><br>


</small></small></big></big><big style="font-family: Verdana;"><big><small><small><br>


<br>


<span style="font-weight: bold;">Table of Contents</span><br>


<br>


<a href="#Installation">Installation</a><br>


<a href="#Configuration">Configuration</a><br>


<a href="#Playlist">Editing the Playlist</a><br>


<a href="#Multiple_Playlists">Creating Multiple Playlists</a><br>


</small></small></big></big><a style="font-family: Verdana;" href="#License">License</a><br style="font-family: Verdana;">


<big style="font-family: Verdana;"><big><small><small><a href="index.html#Credits">Credits</a><br>


</small></small></big></big><br style="font-family: Verdana;">


<br>


<br style="font-family: Verdana;">


<span style="font-weight: bold; font-family: Verdana;"><a name="Installation"></a>Installation</span><br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<span style="font-family: Verdana;">Unzip NyMPh-x.x.zip or
NyMPh-x.x.tar.gz.</span><br style="font-family: Verdana;">


<br>


<br style="font-family: Verdana;">


<span style="font-family: Verdana;">The following files,
located in the main directory, are required for
installation:</span><br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small>
</small> <small> </small>
<table style="text-align: left; width: 100%; font-family: Verdana;" border="1" cellpadding="2" cellspacing="2">


  <tbody>


    <tr>


      <td><small>example.html</small></td>


      <td></td>


      <td><small>A simple HTML page that contains the code
necessary to
include the NyMPh flash object in your webpage.</small></td>


    </tr>


    <tr>


      <td><small>nymph.js</small></td>


      <td></td>


      <td><small>A simple JavaScript file that prints out
the
Object/Embed HTML code that displays the NyMPh flash object.
&nbsp;Handle with care.</small></td>


    </tr>


    <tr>


      <td><small>nymph.swf</small></td>


      <td></td>


      <td><small>The NyMPh flash object file.</small></td>


    </tr>


    <tr>


      <td><small>playlist.xml</small></td>


      <td></td>


      <td><small>An exmaple playlist XML file.
&nbsp;See the section
titled "<a href="#Configuration">Configuration</a>"
for&nbsp;details.</small></td>


    </tr>


    <tr>


      <td><small>remote.js</small></td>


      <td></td>


      <td><small>The JavaScript extension of the NyMPh
flash object.
&nbsp;This should not be changed.</small></td>


    </tr>


  
  </tbody>
</table>


<br>


<br style="font-family: Verdana;">


<span style="font-family: Verdana;">To install NyMPh in a
web page, you need to copy the following files to
a directory on your site: nymph.js, remote.js, nymph.swf, and
playlist.xml. &nbsp;For this example, let's say that these files
are placed in the main directory of http://www.example.com/.</span><br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<span style="font-family: Verdana;">After this, place the
following lines of HTML into your web page to
display the NyMPh flash program:</span><br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<div style="border: 1px dotted rgb(239, 239, 239); font-family: Courier New; font-size: 12px;">&lt;script
type="text/javascript" src="remote.js"&gt;&lt;/script&gt;<br>


&lt;script type="text/javascript"
src="nymph.js"&gt;&lt;/script&gt;</div>


<br style="font-family: Verdana;">


That's it for editing your web page! &nbsp;Next, you need to edit
the configuration file -- playlist.xml -- so that NyMPh can find your
songs, and look the way you want.<br>


<br>


<br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<span style="font-weight: bold; font-family: Verdana;"><a name="Configuration"></a>Configuration</span><br style="font-family: Verdana;">


<br>


This section covers the XML configuration file. &nbsp;The example
configuration file that comes with the NyMPh package is named
"playlist.xml", and following the last section, we will stick with that
name for now.<br>


<br>


If you open playlist.xml in a text editor (like Notepad in Windows,)
you will see the following:<br>


<br>


<div style="border: 1px dotted rgb(239, 239, 239); font-family: Courier New; font-size: 12px;">
&lt;playlist <span style="font-weight: bold;">title</span>="My
Playlist"<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">continuous</span>="false"<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">download</span>="true"
<span style="font-weight: bold;">downloadscript</span>="http://www.MYSITE.com/cgi-bin/download.cgi?&amp;fileid="<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">color</span>="#8F0000"
<span style="font-weight: bold;">text</span>="#FFFFFF"<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">concolor</span>="#000000"
<span style="font-weight: bold;">context</span>="#FF0000"<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">trackcolor</span>="#000000"
<span style="font-weight: bold;">tracktext</span>="#FFFFFF"<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">trackhilite</span>="#8F0000"
<span style="font-weight: bold;">trackhilitetext</span>="#FFFFFF"<br>


&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">listcolor</span>="#8F0000"
<span style="font-weight: bold;">listentry</span>="#AFAFAF"
<span style="font-weight: bold;">listtext</span>="#FFFFFF"<br>


&nbsp;&nbsp;&nbsp; &gt;<br>


&nbsp;&lt;song
title="My 1st Song" file="/song1.mp3"
duration="0:33" downloadurl="song1" /&gt;<br>


&nbsp;&lt;song title="My 2nd Song"
file="http://www.MYSITE.com/song2.mp3" duration="3:22"
downloadurl="song2" /&gt;<br>


&nbsp;&lt;song title="My 3rd Song" file="./myfiles/song3.mp3"
duration="4:01" downloadurl="song3" /&gt;<br>


&lt;/playlist&gt;
</div>


<br>


The bold items in the &lt;playlist&gt; tag are your
configuration options, while the song tags below define your playlist.<br>


<br>


<br>


The following table defines the configuration options.<br>


<small><br>


</small>
<small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small><small> </small><small>
</small><small> </small>
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">


  <tbody>


    <tr>


      <td><small>title</small></td>


      <td></td>


      <td><small>This is the
caption that will display in the title bar of the NyMPh flash object
when it shows on your web page.</small></td>


    </tr>


    <tr>


      <td><small>continuous</small></td>


      <td></td>


      <td><small>This option
can be either "true" or "false". &nbsp;If set to "true",
the next song in the playlist (if any) will start to
play&nbsp;after
the currently playing song is over. &nbsp;If it is set to "false",
the
playing song stops when finished, and the user has to click another
song to continue listening.</small></td>


    </tr>


    <tr>


      <td><small>download</small></td>


      <td></td>


      <td><small>This option
can be either "true" or "false". &nbsp;If set to
"true", download icons are displayed next to each song in the playlist,
and a download link is displayed in the control section at the bottom
of the flash object when a song is played which allows the user to
download the currently playing song without finding it again in the
playlist.</small></td>


    </tr>


    <tr>


      <td><small>downloadscript</small></td>


      <td></td>


      <td><small>This is only
used by NyMPh if the <span style="font-style: italic;">download</span>
option is set to "true". &nbsp;This field specifies the location of
the script that NyMPh should call when a user wants to download a song.
&nbsp;If this field is set, NyMPh will automatically append the
value of the <span style="font-style: italic;">downloadurl</span>
field for the song to the end of the downloadscript value. &nbsp;In
the example above, My 1st Song's full download URL would be
"http://www.MYSITE.com/cgi-bin/download.cgi?fileid=song1".</small></td>


    </tr>


  
  </tbody>
</table>


<br>


<br>


The following table defines the color coniguration fields.
&nbsp;Each field should only contain a hexidecimal RGB color value,
with or without the obligatory "#", e.g. "#000000" and "FFFFFF".
&nbsp;If you omit any of these fields, the program will use its
internal default value.<br>


<small><br>


</small>
<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">


  <tbody>


    <tr>


      <td><small>color</small></td>


      <td></td>


      <td><small>The background color of the flash object.
(title bar)</small></td>


    </tr>


    <tr>


      <td><small>text</small></td>


      <td></td>


      <td><small>The text color of the main flash object.
(title bar)</small></td>


    </tr>


    <tr>


      <td><small>concolor</small></td>


      <td></td>


      <td><small>The control panel background color.
(play/download buttons at the bottom of the program.)</small></td>


    </tr>


    <tr>


      <td><small>context</small></td>


      <td></td>


      <td><small>The control panel text color (download
link at bottom of the program.)</small></td>


    </tr>


    <tr>


      <td><small>trackcolor</small></td>


      <td></td>


      <td><small>The initial background color of the
progress track bar that appears beneath the playlist area.</small></td>


    </tr>


    <tr>


      <td><small>tracktext</small></td>


      <td></td>


      <td><small>The initial text color of the progress
track bar.</small></td>


    </tr>


    <tr>


      <td><small>trackhilite</small></td>


      <td></td>


      <td><small>The replacement background color of the
progress track bar, which covers the initial background color as a song
plays.</small></td>


    </tr>


    <tr>


      <td><small>trackhilitetext</small></td>


      <td></td>


      <td><small>The replacement text color of the progress
track bar.</small></td>


    </tr>


    <tr>


      <td><small>listcolor</small></td>


      <td></td>


      <td><small>The background color of the entire
playlist area.</small></td>


    </tr>


    <tr>


      <td><small>listentry</small></td>


      <td></td>


      <td><small>The background color of a&nbsp;song
entry in the playlist. This is also the color of the scroll bar
position indicator.</small></td>


    </tr>


    <tr>


      <td><small>listtext</small></td>


      <td></td>


      <td><small>The text color of a song entry (e.g. track
name, duration, etc.)</small></td>


    </tr>


  
  </tbody>
</table>


<small><br>


</small><br>


<br>


<span style="font-weight: bold;"><a name="Playlist"></a>Editing
the Playlist</span><br>


<br>


In the example playlist above (from the playlist.xml file) you can see
3 song entries that take the following form:<br>


<br>


<div style="border: 1px dotted rgb(239, 239, 239); font-family: Courier New; font-size: 12px;">
&lt;song
<span style="font-weight: bold;">title</span>="My
1st Song" <span style="font-weight: bold;">file</span>="/song1.mp3"
<span style="font-weight: bold;">duration</span>="0:33"
<span style="font-weight: bold;">downloadurl</span>="song1"
/&gt;
</div>


<br>


To add a new song to your playlist, just duplicate that line of XML,
and change its values. &nbsp;Only the first two fields -- title and
file -- are required.<br>


<br>


The following table describes the fields of a &lt;song&gt; tag:<br>


<br>


<table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2">


  <tbody>


    <tr>


      <td><small>title</small></td>


      <td></td>


      <td><small>The song title that should be displayed in
the playlist entry.</small></td>


    </tr>


    <tr>


      <td><small>file</small></td>


      <td></td>


      <td><small>The location of the actual audio file
(mp3.)
&nbsp;This can be the full url, the relative path, or the absolute
path
to the file, as shown in the examples provided in playlist.xml.
&nbsp;Note: this software has not been tested with any audio format
other than MPEG-3.</small></td>


    </tr>


    <tr>


      <td><small>duration</small></td>


      <td></td>


      <td><small>OPTIONAL -- the duration of the song.
&nbsp;This can
be whatever you want, and appears at the far right of the track
listing, if provided. &nbsp;Note that there is only a limited
amount of
space to display this value in the track listing -- enough for 2 minute
values, and 2 second values (i.e. 12:34).</small></td>


    </tr>


    <tr>


      <td><small>downloadurl</small></td>


      <td></td>


      <td><small>This is only used if the "download"
configuration
option is set to "true". &nbsp;If the "downloadscript"
configuration
option is set, this value is appended to the&nbsp;value of the
"downloadscript" field before sending the user there. &nbsp;If the
"downloadscript" option is not set, this value represents the URL that
the user is sent to.</small></td>


    </tr>


  
  </tbody>
</table>


<small><br>


</small><br>


The next section will show you how to create multiple configuration
files so that you can show NyMPh on multiple web pages with <br style="font-family: Verdana;">


<br>


<br>


<br>


<span style="font-weight: bold;"><a name="Multiple_Playlists"></a>Creating Multiple
Playlists</span><br>


<br>


You can install NyMPh on as many web pages as you want on the same
site, and you only need one copy of nymph.swf on the site.<br>


<br>


To ready a second copy of the flash object, you need to make copies of
the files nymph.js and playlist.xml, and name them something else.
&nbsp;For this example, we will name them nymphcopy.js and
playlist2.xml.<br>


<br>


You need to edit your playlist2.xml file to add songs and set the
display options, as described in the section "<a href="#Playlist">Editing
the Playlist</a>".<br>


<br>


Once that's done, you have to edit nymphcopy.js. &nbsp;Open the
file in
your favourite text editor, and change the [2] instances of
"playlist.xml" in the file to "playlist2.xml". &nbsp;Save the file
and
close it.<br>


<br>


Next, you would put the two &lt;script&gt; tags into your HTML
page (as described in the "<a href="#Installation">Installation</a>"
section.) &nbsp;For this example, you would use the following HTML
code:<br>


<br>


<div style="border: 1px dotted rgb(239, 239, 239); font-family: Courier New; font-size: 12px;">&lt;script
type="text/javascript" src="remote.js"&gt;&lt;/script&gt;<br>


&lt;script type="text/javascript"
src="nymphcopy.js"&gt;&lt;/script&gt;</div>


<br>


And that's it!<br>


<br>


<br style="font-family: Verdana;">


<span style="font-weight: bold; font-family: Verdana;"></span><br style="font-family: Verdana;">


<span style="font-weight: bold; font-family: Verdana;"><a name="License"></a>License</span><br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<big style="font-family: Verdana;"><big><small><small>NyMPh
is free software,&nbsp;released under the GNU
GPL.<br>


</small></small></big></big><br style="font-family: Verdana;">


<big style="font-family: Verdana;"><big><small><small>GNU
GPL: <a href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a><br>


</small></small></big></big><br style="font-family: Verdana;">


<br>


<br style="font-family: Verdana;">


<span style="font-weight: bold; font-family: Verdana;"><a name="Credits"></a>Credits</span><br style="font-family: Verdana;">


<br style="font-family: Verdana;">


<span style="font-family: Verdana;">Created by Patrick
Neeley &lt;patrick@neeley.org&gt;, August
2008.</span><br style="font-family: Verdana;">


<br>
NyMPh was developed using&nbsp;<a href="http://www.haxe.org/">haXe 1.14</a> and <a href="http://www.swfmill.org/">swfmil 0.2.12</a>.<br>
<br style="font-family: Verdana;">


<br>


<br>


<br style="font-family: Verdana;">


</body>
</html>
